<!--# layout("/common/mallout.html",{"jsBase":"/js/order/settlement/"}){ -->


<div class="area_view">
    <div class="are_hd border_none">
        <span><strong>供应商 </strong>精选供应商，匹配最优质的服务</span>
    </div>
    <div class="area_sd border_radius">
        <i>相关分类：</i>
        <!--# for(smap in sellerInfoMap){ -->
        <span id="providerCount"  count="${smap.key.totalCount}">${smap.key.object.suppName}</span>
        <!--# }-->
    </div>
    <div class="area_bd supplier">
        <ul>

            <!--# for(map in sellerInfoMap){ -->
                <!--# for(seller in map.value){-->
                    <li >
                        <p><a href="/mall/providerDetail.do?sellerId=${seller.sellerId}">
                        <!--# if(seller.sellerImageUrl == null){-->
                        <img src="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/image/pic_pop_01.png">
                        <!--# }else{-->
                        <img src="${imagepath}/${seller.logoUrl}">
                        <!--# }-->
                        </a></p>
                        <p class="text_add">${seller.sellerName}</p>
                        <!--# if( seller.brief == null){ -->
                        <p class="text_intr">简介：暂无</p>
                        <!--# }else{-->
                        <p class="text_intr">简介：${seller.brief}</p>
                        <!--# }-->
                        <p class="text_num"><i>订单：${seller.orderNum}单</i></p>
                        <p class="text_detailed">${seller.area}${seller.addr}</p>
                    </li>
                <!--# }-->
            <!--# }-->
        </ul>
    </div>
    <!---------分页------------>

</div>
    <div align="center" class="pageFloot" id="demo7"></div>



<!-------------------------------->
<!--<div id="demo7"></div>
-->

<!--#} -->
<script>
layui.use(['index','laypage','element'], function(){
    var quoteCountPriceIndex = layui.index;
    var element = layui.element;
    var laypage = layui.laypage;
    quoteCountPriceIndex.init();

//完整分页功能

    page($("span#providerCount").attr('count'));
    function page(count){
        laypage.render({
            elem: 'demo7'
            ,count:count,  //当前总页数 默认10
            limit:20
            ,layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip']
            ,jump: function(obj,first){
                if(!first){//不是第一次 就调用
                //分页请求
                var pageParamDto = {};
                   pageParamDto.pageNo = obj.curr;
                   //pageParamDto.limit = 20;
                    $.post("/mall/pageProviderMore.do",{'pageParamDto':JSON.stringify(pageParamDto)},function (result) {                                        
                         if(result != null){                     
                            var sellerList = [];
                            for(var k in result){
                            	sellerList.push(result[k]);                           	
                            }                            
                            $(".supplier").html("");
                            var html='';
                            var h=sellerList.length;
                          	for(var i=0;i<sellerList.length;i++){
                          		for(var j=0;j<sellerList[i].length;j++){
                          			var seller = sellerList[i][j];
                          		html +='<ul><li >';
                          		html +='<p><a href="/mall/providerDetail.do?sellerId='+seller.sellerId+'">';
                          		if(seller.logoUrl == null){
                          		html +=	'<img src="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/image/pic_pop_01.png">';
                          		}else{
                          		html +=	'<img src="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/'+seller.logoUrl+'">';
                          		}

                          		html +='</a></p>'
               				         +'<p class="text_add">'+seller.sellerName+'</p>'
               				    if(seller.brief == null){
               				    	html+='<p class="text_intr">简介：暂无</p>'
               				    }else{
               				    	html+='<p class="text_intr">简介：'+seller.brief+'</p>'
               				    }
                                
                                html+='<p class="text_num"><i>订单：'+seller.orderNum+'单</i></p>'
                                     +'<p class="text_detailed">'+seller.area+' '+seller.addr+'</p>';
                                html +='</ul></li >';                            
                                $(".supplier").html(html);
                          		}
                          	}
                        }
                    })
                }
            }
        });
    }


    //切换分类时的产品
    element.on('tab(docDemoTabBrief)', function(data){
        var count = $(this).val();
        page(count);
    });

});
</script>